{% extends "simgenex/base_simgenex.html" %}
{%block center%}
<div>
    <h2>{{request.session.sgx_program.name}}</h2>
    <p>
        {{request.session.sgx_program.desc}}
    </p>
    <form action="run" method="post" class="edit">
        {% csrf_token %}
        <fieldset class="border" id="init">
            <legend></legend>
            <div class="input-field">
                <label>Transsys program</label>
                <span class="helptext">Select the transsys program that you want to apply the simulation</span>
                <select name="tp" >
                    {% for tsp in request.session.ts_programs %}
                        {% for target_tp in request.session.sgx_program.target_tp %}
                        <option value="{{tsp.tp.name}}"
                                {% if tsp.tp.name == target_tp.name %}
                                    selected="selected"
                                {% endif %}
                        >{{tsp.tp.name}}</option>
                        {% endfor %}
                    {% endfor %}
                </select>
            </div>
        </fieldset>
        <div class="infut-field">
            <button type="submit" name="submit">Run</button>
        </div>
    </form>
</div>
{% endblock %}